package com.mb.mp.service.impl;

import com.mb.mp.dao.MpSysConfigDOMapper;
import com.mb.mp.domain.MpSysConfigDO;
import com.mb.mp.service.ISysParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 参数管理服务
 *
 * @author
 * @create 2018-09-21 上午9:40
 **/
@Service("sysParamService")
public class SysParamServiceImpl implements ISysParamService {

    @Autowired
    private MpSysConfigDOMapper sysConfigDOMapper;

    @Override
    public List<MpSysConfigDO> queryList(Map<String, Object> map) {
        return sysConfigDOMapper.list(map);
    }

    @Override
    public int count(Map<String, Object> map) {
        return sysConfigDOMapper.count(map);
    }

    @Override
    public MpSysConfigDO getSysConfig(Long id) {
        return sysConfigDOMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateSysConfig(MpSysConfigDO sysConfigDO) {
        return sysConfigDOMapper.updateByPrimaryKeySelective(sysConfigDO);
    }
}
